using MediatR;
using S.O.ErrorCode;

namespace RBAC.Read.Api.Application.Command.Medical
{
    /// <summary>
    /// 获取医生排班列表命令
    /// </summary>
    public class GetDoctorScheduleListCommand : IRequest<APIResult<List<DoctorScheduleDto>>>
    {
        /// <summary>
        /// 医生ID（可选）
        /// </summary>
        public int? DoctorId { get; set; }

        /// <summary>
        /// 科室ID（可选）
        /// </summary>
        public int? DepartmentId { get; set; }

        /// <summary>
        /// 排班日期（可选）
        /// </summary>
        public DateTime? ScheduleDate { get; set; }

        /// <summary>
        /// 时间段（可选）
        /// </summary>
        public string? TimeSlot { get; set; }
    }

    /// <summary>
    /// 医生排班数据传输对象
    /// </summary>
    public class DoctorScheduleDto
    {
        /// <summary>
        /// 排班ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 医生ID
        /// </summary>
        public int DoctorId { get; set; }

        /// <summary>
        /// 医生姓名
        /// </summary>
        public string DoctorName { get; set; } = string.Empty;

        /// <summary>
        /// 科室ID
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 科室名称
        /// </summary>
        public string DepartmentName { get; set; } = string.Empty;

        /// <summary>
        /// 排班日期
        /// </summary>
        public DateTime ScheduleDate { get; set; }

        /// <summary>
        /// 时间段（上午/下午/晚上）
        /// </summary>
        public string TimeSlot { get; set; } = string.Empty;

        /// <summary>
        /// 开始时间
        /// </summary>
        public TimeSpan StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public TimeSpan EndTime { get; set; }

        /// <summary>
        /// 最大挂号数量
        /// </summary>
        public int MaxRegistrations { get; set; }

        /// <summary>
        /// 当前挂号数量
        /// </summary>
        public int CurrentRegistrations { get; set; }

        /// <summary>
        /// 排班状态（正常/暂停/取消）
        /// </summary>
        public string ScheduleStatus { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        /// <summary>
        /// 是否还有号源
        /// </summary>
        public bool HasAvailableSlots { get; set; }
    }
}